package org.jeecg.common.util.enums.centent;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Objects;

/**
 * @author guoyh
 * @ClassName UserStateAction
 * @Description
 * @since 2020/9/6 02:58
 **/
@Getter
@AllArgsConstructor
public enum  UserStateAction {

    Login,Logout,Disconnect;

    public static UserStateAction getInstance(String name){
        return Arrays.stream(values()).filter(item -> Objects.equals(item.name(),name)).findFirst().orElse(null);
    }
}
